<?php

namespace app\services;

use plugin\admin\app\model\ScenicArea;

class ScenicAreaService
{
    public static function detail($id)
    {
        $detail = ScenicArea::select(['id', 'longitude', 'latitude', 'scenic_spot_count', 'range_sw_longitude', 'range_sw_latitude', 'range_ne_longitude', 'range_ne_latitude', 'cover_bg', 'marker_icon'])->where('id', $id)->first();

        $detail['cover_bg'] = full_url($detail['cover_bg']);
        $detail['marker_icon'] = full_url($detail['marker_icon']);

        return $detail;
    }
}